package com.qingcheng.service.order;
import com.qingcheng.entity.OrderOrderItems;
import com.qingcheng.entity.PageResult;
import com.qingcheng.entity.Split;
import com.qingcheng.pojo.order.Order;
import com.qingcheng.pojo.order.OrderItem;

import java.util.*;

/**
 * order业务逻辑层
 */
public interface OrderService {


    public List<Order> findAll();


    public PageResult<Order> findPage(int page, int size);


    public List<Order> findList(Map<String, Object> searchMap);


    public PageResult<Order> findPage(Map<String, Object> searchMap, int page, int size);


    public Order findById(String id);


    public Map<String,Object> add(Order order);


    public void update(Order order);


    public void delete(String id);

    public OrderOrderItems findOrderOrderItemsById(String id);


    public void batchSend(List<Order> orders);

    public void orderTimeOutLogic();

    void merge(String orderId1, String orderId2);

    void split(List<OrderItem> orderItems);


    public PageResult<OrderOrderItems> findPayPage(Map<String,Object> searchMap, int page, int size);


    /**
     * 修改订单状态
     * @param orderId
     * @param transactionId
     */
    public void updatePayStatus(String orderId,String transactionId);

    /**
     * 根据用户名查找所有订单信息
     * @param username
     * @return
     */
    Map<String,Object> queryOrderListByUsername(String username);



    /**
     * 根据商品id查询订单详情
     * @param orderId
     * @return
     */
    OrderOrderItems findOneOrder(String orderId,String username);
}